import { DefaultLayout, ParentLayout } from '@/layout'
import type { Route } from '@/layout/components'

export default {
  path: '/haiwei',
  name: 'Haiwei',
  component: DefaultLayout,
  redirect: '/haiwei/labelManage',
  meta: {
    title: '吃喝玩乐',
    roles: ['吃喝玩乐'],
    icon: 'menu-cruise',
    sort: 5,
    alwaysShow: true
  },
  children: [
    {
      path: 'order',
      name: 'Order',
      component: ParentLayout,
      meta: { title: '大牌点餐', roles: ['大牌点餐'] },
      children: [
        {
          path: 'dcGoodsManage',
          name: 'DcGoodsManage',
          component: () => import('@/views/order/goodsManage'),
          meta: { title: '门店管理', roles: ['门店管理'] }
        },
        {
          path: 'dcCategoriesManage',
          name: 'DcCategoriesManage',
          component: () => import('@/views/order/categoriesManage'),
          meta: { title: '分类管理', hidden: true }
        },
        {
          path: 'order',
          name: 'Order',
          component: ParentLayout,
          redirect: '/order/orderManage',
          meta: { title: '订单管理', roles: ['点餐订单管理'] },
          children: [
            {
              path: 'dcOrderManage',
              name: 'DcOrderManage',
              component: () => import('@/views/order/orderManage'),
              meta: { title: '订单列表', roles: ['点餐订单列表'] }
            },
            {
              path: 'dcAfterSaleManage',
              name: 'DcAfterSaleManage',
              component: () =>
                import('@/views/order/orderManage/afterSaleManage'),
              meta: { title: '售后订单', roles: ['点餐售后订单'] }
            },
            {
              path: 'dcOrderDetailManage',
              name: 'DcOrderDetailManage',
              component: () =>
                import('@/views/order/orderManage/orderDetailManage'),
              meta: { title: '订单详情', hidden: true }
            }
          ]
        },
        {
          path: 'dcTimeLimitManage',
          name: 'DcTimeLimitManage',
          component: () => import('@/views/order/timeLimitManage'),
          meta: { title: '限时活动设置', roles: ['点餐限时活动设置'] }
        },
        {
          path: 'dcCreateLimit',
          name: 'DcCreateLimit',
          component: () => import('@/views/order/timeLimitManage/createLimit'),
          meta: { title: '限时活动', hidden: true }
        }
      ]
    },
    {
      path: 'movie',
      name: 'Movie',
      component: ParentLayout,
      meta: { title: '电影购票', roles: ['电影购票'] },
      children: [
        {
          path: 'movieIndexBanner',
          name: 'MovieIndexBanner',
          component: () => import('@/views/movie/movieIndexBanner'),
          meta: { title: '电影首页Banner', roles: ['电影首页Banner'] }
        },
        {
          path: 'movieManage',
          name: 'MovieManage',
          component: () => import('@/views/movie/movieManage'),
          meta: { title: '电影管理', roles: ['电影管理'] }
        },
        {
          path: 'cinemaManage',
          name: 'CinemaManage',
          component: () => import('@/views/movie/cinemaManage'),
          meta: { title: '影院管理', roles: ['影院管理'] }
        },

        {
          path: 'dyOrderManage',
          name: 'DyOrderManage',
          component: () => import('@/views/movie/orderManage'),
          meta: { title: '订单管理', roles: ['电影订单管理'] }
        },
        {
          path: 'dyOrderDetailManage',
          name: 'DyOrderDetailManage',
          component: () =>
            import('@/views/movie/orderManage/orderDetailManage'),
          meta: { title: '订单详情', hidden: true }
        },
        {
          path: 'dyTimeLimitManage',
          name: 'DyTimeLimitManage',
          component: () => import('@/views/movie/timeLimitManage'),
          meta: { title: '限时活动设置', roles: ['电影限时活动设置'] }
        },
        {
          path: 'dyCreateLimit',
          name: 'DyCreateLimit',
          component: () => import('@/views/movie/timeLimitManage/createLimit'),
          meta: { title: '限时活动', hidden: true }
        }
      ]
    },
    {
      path: 'card',
      name: 'Card',
      component: ParentLayout,
      meta: { title: '会员充值', roles: ['会员充值'] },
      children: [
        {
          path: 'cardGoodsManage',
          name: 'CardGoodsManage',
          component: () => import('@/views/card/cardGoodsManage'),
          meta: { title: '商品管理', roles: ['会员充值商品管理'] }
        },
        {
          path: 'cardOrderManage',
          name: 'CardOrderManage',
          component: () => import('@/views/card/cardOrderManage'),
          meta: { title: '订单管理', roles: ['会员充值订单管理'] }
        }
      ]
    }
  ]
} as Route
